home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Resources / Online / Term / Extras / Source / gtlayout-source.lha / LT_PressButton.c < prev    next >
C/C++ Source or Header  |  1996-08-22  |  1KB  |  62 lines

  1. /*
  2. **    GadTools layout toolkit
  3. **
  4. **    Copyright © 1993-1996 by Olaf `Olsen' Barthel
  5. **        Freely distributable.
  6. **
  7. **    :ts=4
  8. */
  9.  
  10. #ifndef _GTLAYOUT_GLOBAL_H
  11. #include "gtlayout_global.h"
  12. #endif
  13.  
  14. /****** gtlayout.library/LT_PressButton ******************************************
  15. *
  16. *   NAME
  17. *    LT_PressButton -- Highlight a button so it looks as if the user
  18. *                      has selected it.
  19. *
  20. *   SYNOPSIS
  21. *    LT_PressButton(Handle,ID);
  22. *                      A0  D0
  23. *
  24. *    VOID LT_PressButton(LayoutHandle *,LONG);
  25. *
  26. *   FUNCTION
  27. *    You can provide visual feedback for BUTTON_KIND objects by calling
  28. *    this routine. They will briefly appear to be selected and then
  29. *    fall back to their original states.
  30. *
  31. *   INPUTS
  32. *    Handle - Pointer to LayoutHandle structure
  33. *
  34. *    ID - ID of button object to highlight
  35. *
  36. *   RESULT
  37. *    none
  38. *
  39. ******************************************************************************
  40. *
  41. */
  42.  
  43. VOID LIBENT
  44. LT_PressButton(REG(a0) LayoutHandle *handle,REG(d0) LONG id)
  45. {
  46.     if(handle)
  47.     {
  48.         struct Gadget *gadget;
  49.  
  50.         if(gadget = LTP_FindGadget(handle,id))
  51.         {
  52.             ObjectNode *node;
  53.  
  54.             if(GETOBJECT(gadget,node))
  55.             {
  56.                 if(!node->Disabled)
  57.                     LTP_BlinkButton(handle,gadget);
  58.             }
  59.         }
  60.     }
  61. }
  62.